
package attack.nartan;

import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.Rectangle;

import framework.BasicFighter;
import framework.attack.BasicAttack;
import framework.collision.SimpleAttackCollisionManager;

public class Yop extends BasicAttack<BasicFighter> {

	public Yop() {
		this(null);
	}

	public Yop(BasicFighter attacker) {
		this.currentTime = 0;
		this.attacker = attacker;
		setAttackCollisionManager(new SimpleAttackCollisionManager());
	}

	@Override
	public void update(GameContainer gc, int delta) {
		super.update(gc, delta);
	}

	@Override
	public void draw(Graphics g) {
		g.setColor(Color.blue);
		g.fillRect(0, 0, 5550, 5550);
	}

	@Override
	public Rectangle getHitBox() {
		return new Rectangle(0, 0, 5550, 5550);
	}

	@Override
	public void trigger() {
		super.trigger();
		setXspeed(getAttacker().isForward() ?  5 : -5);
		setX(getAttacker().getX());
		setY(getAttacker().getY());
	}

	@Override
	public int getPower() {
		return 10;
	}

	@Override
	public int getDuration() {
		return 50;
	}

}
